<?php

namespace app\demo\controller;

use app\BaseController;
use app\common\business\Abc;

class Index extends BaseController
{
    public function abc()
    {

 $class = $this->request->param("class", "0", "intval");
        if (empty($class)) {
            return show(config("static.error"), "参数错误");
        }

        $business = new Abc();
        $results = $business->get_abc_class($class);

        if (empty($results)) {
            return show(config("static.error"), "数据为空");
        }

        return show(config("static.success"), "成功", $results);
    }
    public function index()
    {   
        // print_r($asd);
        //   throw new \think\exception\HttpException(404, '异常消息');
    }
}
